import QtQuick 2.0
//import QtQuick.Layouts 1.2
//import QtQuick.Controls 1.4
//import QtQuick.Controls.Styles 1.4

Rectangle {
    id:root;
    color: "white";
    visible: true;
    width: 1920;
    height: 1080;
    Canvas{
        id:canvas
        x:200
        y:200
        width:500
        height: 500
        antialiasing: true
        onPaint: {
            var ctx = getContext("2d");
            ctx.save();
            ctx.clearRect(0, 0, canvas.width, canvas.height);
            ctx.beginPath();
            ctx.lineWidth = 100;
            ctx.fillStyle =  'blue';
//            ctx.arc(canvas.centerWidth, canvas.centerHeight, 240, 0,Math.PI);

//            ctx.lineTo(canvas.width/2,canvas.height/2);
            ctx.arc(canvas.width/2,
                    canvas.height/2,
                    240,
                    0,
                    Math.PI/2,
                    false);
//            ctx.lineTo(canvas.width/2,canvas.height/2);
            ctx.fill();
            ctx.save();
            ctx.strokeStyle = 'red';
            ctx.lineWidth = 10;
            ctx.arc(canvas.centerWidth,
                    canvas.centerHeight,
                    240,
                    0,
                    Math.PI/2);
            ctx.stroke();


//            ctx.closePath();
            ctx.restore();
        }
    }

}
